import { RouteRecordRaw } from "vue-router";

const Layout = () => import("@/layout/index.vue");

export const routes: RouteRecordRaw[] = [
    {
        path: "/",
        component: Layout,
        redirect: () => {
            return {
                path: "/home",
            };
        },
        children: [
            // 首页
            {
                path: "/home",
                component: () => import("@/views/Home/index.vue"),
            },
            // part1
            {
                path: "/part1",
                component: () => import("@/views/Home/part1.vue"),
            },
            // part2
            {
                path: "/part2",
                component: () => import("@/views/Home/part2.vue"),
            },// part3
            {
                path: "/part3",
                component: () => import("@/views/Home/part3.vue"),
            },// part4
            {
                path: "/part4",
                component: () => import("@/views/Home/part4.vue"),
            },
        ],
    },
    {
        path: "/exam",
        redirect: () => {
            return {
                path: "/exam-mock",
            };
        },
        children: [
            // 考试
            {
                path: "/exam-mock",
                component: () => import("@/views/exam/Mock/index.vue"),
            },
            // 考试结果
            {
                path: "/exam-result",
                component: () => import("@/views/exam/Result/index.vue"),
            },
            //试题解析
            {
                path: "/exam-analysis",
                component: () => import("@/views/exam/Analysis/index.vue"),
            },
        ],
    },

];
